package com.wingsfrog.puzzle.service.impl;

import com.wingsfrog.puzzle.modules.dao.PictureDao;
import com.wingsfrog.puzzle.modules.dao.PuzzlesDao;
import com.wingsfrog.puzzle.modules.entity.Picture;
import com.wingsfrog.puzzle.modules.entity.Puzzles;
import com.wingsfrog.puzzle.service.PictureService;
import com.wingsfrog.puzzle.service.PuzzlesService;
import com.wingsfrog.puzzle.util.RandomUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Timestamp;
import java.util.Random;

@Service
public class PuzzlesServiceImpl implements PuzzlesService{
    @Autowired
    PuzzlesDao dao;

    @Override
    public Puzzles get(Integer puzzleId) {
        return dao.findOne(puzzleId);
    }

    @Override
    public Puzzles getByHash(Long hash, int start) {
        return dao.findByHash(hash, start);
    }

    @Override
    public Puzzles getByHardness(Integer hardness) {
        return dao.findByHardness(hardness);
    }

}
